﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataBase.Daihoctuonglai;

namespace dai_hoc_tuong_lai.Areas.Admin.Models
{
    public class CateNganhHocModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public Nullable<System.DateTime> NgayTao { get; set; }
        public string Mota { get; set; }
        public string Keyword { get; set; }
        public string Description { get; set; }
        public string KeyTitle { get; set; }
        public Nullable<int> ParentId { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        

        public static void MapFrom(CateNganhHocModel Model, ref Cate_NganhHoc entity)
        {
            entity.Id = Model.Id;
            entity.Name = Model.Name;
            entity.NgayTao = Model.NgayTao;
            entity.DateCreate = Model.DateCreate;
            entity.Mota = Model.Mota;
            entity.Keyword = Model.Keyword;
            entity.Description = Model.Description;
            entity.KeyTitle = Model.KeyTitle;
            entity.ParentId = Model.ParentId;
        }

        public static void MapFrom(Cate_NganhHoc entity, ref CateNganhHocModel Model)
        {
            Model.Id = entity.Id;
            Model.Name = entity.Name;
            Model.NgayTao = entity.NgayTao;
            Model.DateCreate = entity.DateCreate;
            Model.Mota = entity.Mota;
            Model.Keyword = entity.Keyword;
            Model.Description = entity.Description;
            Model.KeyTitle = entity.KeyTitle;
            Model.ParentId = entity.ParentId;
        }

    }

    public class NganhHocModel
    {
        public int Id { get; set; }
        public string Title { get; set; }
        public string Noidung { get; set; }
        public Nullable<System.DateTime> NgayTao { get; set; }
        public Nullable<int> Cate_Id { get; set; }
        public string Keyword { get; set; }
        public string KeyDescrption { get; set; }
        public string KeyTitle { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public string Anh { get; set; }

        public static void MapFrom(NganhHocModel Model, ref Nganh_Hoc entity)
        {
            entity.Id = Model.Id;
            entity.Title = Model.Title;
            entity.Noidung = Model.Noidung;
            entity.NgayTao = Model.NgayTao;
            entity.Cate_Id = Model.Cate_Id;
            entity.Keyword = Model.Keyword;
            entity.KeyDescrption = Model.KeyDescrption;
            entity.KeyTitle = Model.KeyTitle;
            entity.DateCreate = Model.DateCreate;
            entity.Anh = Model.Anh;
        }

        public static void MapFrom(Nganh_Hoc entity, ref NganhHocModel Model)
        {
            Model.Id = entity.Id;
            Model.Title = entity.Title;
            Model.Noidung = entity.Noidung;
            Model.NgayTao = entity.NgayTao;
            Model.Cate_Id = entity.Cate_Id;
            Model.Keyword = entity.Keyword;
            Model.KeyDescrption = entity.KeyDescrption;
            Model.KeyTitle = entity.KeyTitle;
            Model.DateCreate = entity.DateCreate;
            Model.Anh = entity.Anh;
        }
    }
}